package com.woniu.cq.sentinel;

import com.alibaba.csp.sentinel.adapter.spring.webmvc.callback.RequestOriginParser;
import org.springframework.stereotype.Component;

import javax.servlet.http.HttpServletRequest;

/**
 * @author Daniel
 * @version 1.0.0
 * @ClassName MyRequestOriginParser
 * @Description TODO
 * @createTime 2020年09月21日 17:09:00
 */
@Component
public class MyRequestOriginParser implements RequestOriginParser {
    @Override
    public String parseOrigin(HttpServletRequest httpServletRequest) {
        return httpServletRequest.getParameter("appName");
    }
}
